package io.debezium.connector.postgresql.connection;

import com.huawei.gaussdb.jdbc.replication.fluent.logical.ChainedLogicalStreamBuilder;
import io.debezium.connector.postgresql.TypeRegistry;

import java.nio.ByteBuffer;
import java.sql.SQLException;
import java.util.function.Function;

public interface MessageDecoder {
    void processMessage(
            ByteBuffer var1, ReplicationStream.ReplicationMessageProcessor var2, TypeRegistry var3)
            throws SQLException, InterruptedException;

    ChainedLogicalStreamBuilder optionsWithMetadata(
            ChainedLogicalStreamBuilder var1, Function<Integer, Boolean> var2);

    ChainedLogicalStreamBuilder optionsWithoutMetadata(
            ChainedLogicalStreamBuilder var1, Function<Integer, Boolean> var2);

    default void setContainsMetadata(boolean flag) {}

    boolean shouldMessageBeSkipped(ByteBuffer var1, Lsn var2, Lsn var3, WalPositionLocator var4);

    void close();
}
